From 25f76968af34388d56359555c13662e8b51071a4 Mon Sep 17 00:00:00 2001 From: tsteven4 <13596209+tsteven4@users.noreply.github.com> Date: Sat, 13 Feb 2021 09:09:58 -0700 Subject: [PATCH] remove a few old kludges that are no longer needed. (#691) * remove a few old kludges that are no longer needed. * clean up upgrade a bit "GPSBabel Version " doesn't need to be removed from currentVersionIn in UpgradeCheck::checkForUpgrade, that is taken care of in MainWindow::findBabelVersion --- gui/preferences.cc | 5 ----- gui/upgrade.cc | 5 ++--- gui/upgrade.h | 4 ++-- kml.cc | 5 ----- 4 files changed, 4 insertions(+), 15 deletions(-) diff --git a/gui/preferences.cc b/gui/preferences.cc index 15e5df086..f37c91d76 100644 --- a/gui/preferences.cc +++ b/gui/preferences.cc @@ -18,7 +18,6 @@ #include "preferences.h" -#include "../gbversion.h" class FormatListEntry : public QListWidgetItem { @@ -44,10 +43,6 @@ Preferences::Preferences(QWidget* parent, QList& formatList, ui_.startupCheck->setChecked(babelData_.startupVersionCheck_); ui_.reportStatisticsCheck->setChecked(babelData_.reportStatistics_); ui_.ignoreVersionMismatchCheck->setChecked(babelData_.ignoreVersionMismatch_); - // Because of an unfortunate bug in 1.4.0, we turn this off in 1.4.1. - if (VERSION == QString("1.4.1")) { - babelData_.ignoreVersionMismatch_ = false; - } connect(ui_.buttonBox, &QDialogButtonBox::accepted, this, &Preferences::acceptClicked); connect(ui_.buttonBox, &QDialogButtonBox::rejected, this, &Preferences::rejectClicked); diff --git a/gui/upgrade.cc b/gui/upgrade.cc index bb6bf902f..ecb796ce7 100644 --- a/gui/upgrade.cc +++ b/gui/upgrade.cc @@ -101,12 +101,11 @@ UpgradeCheck::updateStatus UpgradeCheck::checkForUpgrade( bool allowBeta) { currentVersion_ = currentVersionIn; - currentVersion_.remove("GPSBabel Version "); QDateTime soonestCheckTime = lastCheckTime.addDays(1); if (!testing && QDateTime::currentDateTime() < soonestCheckTime) { // Not time to check yet. - return UpgradeCheck::updateUnknown; + return updateUnknown; } manager_ = new QNetworkAccessManager; @@ -164,7 +163,7 @@ UpgradeCheck::updateStatus UpgradeCheck::checkForUpgrade( replyId_ = manager_->post(request, args.toUtf8()); - return UpgradeCheck::updateUnknown; + return updateUnknown; } QDateTime UpgradeCheck::getUpgradeWarningTime() diff --git a/gui/upgrade.h b/gui/upgrade.h index a6c90a62e..64f07f76a 100644 --- a/gui/upgrade.h +++ b/gui/upgrade.h @@ -38,11 +38,11 @@ public: UpgradeCheck(QWidget* parent, QList& formatList, BabelData& bd); ~UpgradeCheck(); - typedef enum { + enum updateStatus { updateUnknown, updateCurrent, updateNeeded, - } updateStatus; + }; UpgradeCheck::updateStatus checkForUpgrade(const QString& babelVersion, const QDateTime& lastCheckTime, diff --git a/kml.cc b/kml.cc index 12ad2e2ff..fbcafba07 100644 --- a/kml.cc +++ b/kml.cc @@ -1755,11 +1755,6 @@ void KmlFormat::write() precision = atol(opt_precision); writer->writeStartDocument(); - // FIXME: This write of a blank line is needed for Qt 4.6 (as on Centos 6.3) - // to include just enough whitespace between and to pass - // diff -w. It's here for now to shim compatibility with our zillion - // reference files, but this blank link can go away some day. - writer->writeCharacters(QStringLiteral("\n")); writer->setAutoFormatting(true); -- 2.30.2